import type { App } from 'vue';
const directives: { [propName: string]: any } = {};
// 小型组件引入


const single = import.meta.glob('./*.ts', { eager: true, import: 'default' });
for (const key in single) {
    const _key = key.replace(/\.js/g, '').replace(/\.\//g, '');
    directives[_key] = single[key]
}

export default {
    install: async (app: App) => {
        for (const key in directives) {
            const element = directives[key];
            app.directive(key, element)
        }
    }
}